<?php
header("Content-Type:text/html; charset=utf-8");
if(isset($_POST['submit'])){
	echo 'here - start<br>';
	include '../common/httpdown.class.php';
	$sendurl = "http://www.y.com/demo/demo_fsocket_receive.php";
	$htppdown = new httpdown();
	$htppdown->add_form('content', $_POST['content']);
	if(!empty($_FILES['file']['tmp_name'])){
		$htppdown->add_filecontents('PackFile', $_FILES['file']['name'], file_get_contents($_FILES['file']['tmp_name']));
	}
	$htppdown->connect($sendurl);
	$s = $htppdown->getraw();
	echo $s;
	echo 'here - end<br>';
}else{
?>
<form method="POST" enctype="multipart/form-data" >
<input type="text" name="content" value="大家好"/>
<input type="file" name="file" />
<input type="submit" name="submit"  value="提交"/>
</form>
<?php 
}
?>